<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <base href="<%=request.getContextPath()+"/"%>">
    <title>无标题文档</title>
</head>

	   <body style="height: 100%; margin: 0">
	   <div >
	   	<h1 align="center">公司收入统计柱状图</h1>
	   </div>	
       <div id="container" style="height: 90%"></div>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
       <script type="text/javascript">
            var dom = document.getElementById("container");
            var myChart = echarts.init(dom);
            var app = {};
            var option;
            option = {
                title: {
                    text: '收入统计',
                    left: 'center'
                },
                tooltip: {
                    trigger: 'item'
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                },
                series: [
                    {
                        name: '经济收益',
                        type: 'pie',
                        radius: '50%',
                        data: [
                            {value: ${requestScope.a1}, name: '人员外包'},
                            {value: ${requestScope.a2}, name: '项目开发'},
                            {value: ${requestScope.a3}, name: '报名费'},
                            {value: ${requestScope.a4}, name: '学费'},
                            {value: ${requestScope.a5}, name: '认证考试'},
                            {value: ${requestScope.a6}, name: '其他'}
                        ],
                        emphasis: {
                            itemStyle: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            if (option && typeof option === 'object') {
                myChart.setOption(option);
            }

       </script>
   </body>
</html>
